﻿Public Class oDocPromotionBuy
    Public Function GetDocPromotionBuyByDocEntry(ByVal dataBaseName As String, ByVal docEntry As String) As DataSet
        Dim connect As New Connection()
        Try
            Dim ds As New DataSet("oDocPromotionBuy")
            Dim errMsg As String = connect.setSQLDB(dataBaseName)
            If errMsg.Length = 0 Then
                ds = connect.ObjectGetAll_Query_SAP("SELECT * FROM oDocPromotionBuy WHERE DocEntry = @Param1", New Object() {docEntry})
            End If
            Return ds
        Catch ex As Exception
            Throw ex
        End Try
    End Function
    Public Function GetDocPromotionBuyByID(ByVal dataBaseName As String, ByVal id As String) As DataSet
        Dim connect As New Connection()
        Try
            Dim ds As New DataSet("oDocPromotionBuy")
            Dim errMsg As String = connect.setSQLDB(dataBaseName)
            If errMsg.Length = 0 Then
                ds = connect.ObjectGetAll_Query_SAP("SELECT * FROM oDocPromotionBuy WHERE ID = @Param1", New Object() {id})
            End If
            Return ds
        Catch ex As Exception
            Throw ex
        End Try
    End Function

End Class
